<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="./src/assets/favicon.ico" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta property="og:description" content="Get expert information on health, technology, business, and more at InfotoPlaza. Stay informed with reliable updates on what matters most.">
    <title>infotoPlaza.com</title>
    <link rel="stylesheet" type="text/css" href="./src/assets/css/reset.css">
    <link rel="stylesheet" type="text/css" href="./index.css">
  </head>
  <body>
      <header class="header">
      <div class="wrap">
          <div class="main-header">
              <nav class="nav" aria-label="Site Menu">
                  <a class="logo-is-image logo-link" href="https://factavenue.net/" rel="home" title="FactAvenue">
                      <h1>
                          <img alt="FactAvenue" class="logo-image" src="./src/assets/logo.jpg"
                              srcset="./src/assets/logo.jpg ./src/assets/logo.jpg 2x">
                      </h1>
                  </a>
                  <ul id="menu-primary-menu-english" class="nav__list">
                      <li id="menu-item-125" class="menu-item">
                          <a class="nav__link" target="_parent"
                              href="#/category/travel">Travel</a>
                      </li>
                      <li id="menu-item-125" class="menu-item">
                          <a class="nav__link" target="_parent"
                              href="#/category/health">Health</a>
                      </li>
                      <li id="menu-item-125" class="menu-item">
                          <a class="nav__link" target="_parent"
                              href="#/category/lifeStyle">LifeStyle</a>
                      </li>
                      <li id="menu-item-125" class="menu-item">
                          <a class="nav__link" target="_parent"
                              href="#/category/finance">Finance</a>
                      </li>
                      <li id="menu-item-125" class="menu-item">
                          <a class="nav__link" target="_parent"
                              href="#/category/auto">Auto</a>
                      </li>
                      <li id="menu-item-125" class="menu-item">
                          <a class="nav__link" target="_parent"
                              href="#/category/fashion">Fashion</a>
                      </li>
                  </ul>
              </nav>
              <div class="searchBox">
                  <input type="text" placeholder="Search..." class="search-input" >
                  <i class="layui-icon layui-icon-search"></i>
              </div>
          </div>

      </div>
        </header>
    <div id="app"></div>

    <footer class="copyRight">
        <div class="wrap">
            <ul class="links">
                <li><a href="#">Home</a></li>
                <li><a href="#">ABOUT US</a></li>
                <li><a href="#">TERMS OF USE</a></li>
                <li><a href="#">PRIVACY POLICY</a></li>
                <li><a href="./contactUs">CONTACT US</a></li>
            </ul>
            <br>
            <br>
            <p>
                © 2024 FactAvenue.com
            </p>
            <br>
            <strong>Disclaimer</strong>
            <br>
            <div class="descption">
                The content available on this website, including text, graphics, images, and information, is provided only for general informational purposes. The materials and details on these pages, along with any terms, conditions, or descriptions, are subject to  change without prior notice.
            </div>
        </div>
    </footer>
    <script type="module" src="./src/main.js"></script>

    <script>
        let befortop = 0;
        //监听滚动条事件
        function callBack() {
            let aftertop = document.documentElement ? document.documentElement.scrollTop : document.body.scrollTop;//兼容
            if (aftertop - befortop > 0) {
                document.querySelector('.header').style.marginTop = '-60px'
                console.log('向下');
            } else {
                if (aftertop >= 50) {
                    document.querySelector('.header').style.marginTop =  '-3px'
                }
                console.log('向上');
            }
            befortop = aftertop;
        }

        let timeout = null,
        startTime = Date.parse(new Date); // 开始时间
        window.addEventListener('scroll', function () {
            if (timeout !== null) clearTimeout(timeout);
            let curTime = Date.parse(new Date); // 当前时间
            if (curTime - startTime >= 1000) { // 时间差>=1秒直接执行
                callBack();
                startTime = curTime;
            } else { // 否则延时执行，像滚动了一下，差值<1秒的那种也要执行
                timeout = setTimeout(callBack(), 300);
            }
        });

        const input = document.querySelector('.search-input')
        input.onkeyup = function (event) {
            
        let e = event || window.event;
        if (e && e.keyCode == 13) { //回车键的键值为13
            location.href = `./search/${input.value}`
        }
    }

    </script>
  </body>
</html>
